package com.team.engine.fileupload.dao;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.team.engine.basedao.BaseEntity;

/**
 * 文件信息表实体
 * @author MengLH
 * @data 2010-8-4
 */
@Entity
@Table(name="t_file")
public class TFile extends BaseEntity {

	
	/**
	 * 文件Id
	 */
	@Id
	@Column(name="file_id", unique=true)
	private int fileId;
	
	/**
	 * 文件路径
	 */
	@Column
	private String path;
	
	/**
	 * 文件名
	 */
	@Column
	private String name;
	
	/**
	 * 文件类型
	 */
	@Column
	private String type;
	
	/**
	 * 上传时间/修改时间
	 */
	@Column
	@Temporal(TemporalType.TIMESTAMP)
	private Date timeflag;
	
	@ManyToOne
	@JoinColumn(name="filegroup_id")
	private TFilegroup filegroup;
	
	public TFile(){
	}
	
	public int getFileId() {
		return fileId;
	}

	public void setFileId(int fileId) {
		this.fileId = fileId;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getTimeflag() {
		return timeflag;
	}

	public void setTimeflag(Date timeflag) {
		this.timeflag = timeflag;
	}

	public TFilegroup getFilegroup() {
		return filegroup;
	}

	public void setFilegroup(TFilegroup filegroup) {
		this.filegroup = filegroup;
	}

}
